package com.bupt.godxian.charging.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bupt.godxian.charging.entity.ChargeWaitArea;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChargeWaitAreaMapper extends BaseMapper<ChargeWaitArea> {

    @Select("SELECT request_id FROM charge_wait_area WHERE type = #{chargeMode}")
    List<String> selectChargeRequestIdsByChargeMode(@Param("chargeMode") String chargeMode);

    @Delete("delete from charge_wait_area where request_id=#{charge_id}")
    void deleteById(String charge_id);


}
